package com.kantboot.business.common.domain.entity;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;
import java.util.Date;

/**
 * 轮播图管理
 * @author 方某方
 */
@Entity
@Getter
@Setter
@Table(name = "bus_common_carousel_image")
@Accessors(chain = true)
@EntityListeners(AuditingEntityListener.class)
@DynamicUpdate
@DynamicInsert
public class BusCommonCarouselImage implements Serializable {

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    /**
     * 创建时间
     */
    @CreatedDate
    @Column(name = "gmt_create")
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @CreatedDate
    @Column(name = "gmt_modified")
    private Date gmtModified;

    /**
     * 轮播图名称
     */
    @Column(name = "t_name")
    private String name;

    /**
     * 轮播图的文件ID
     */
    @Column(name = "file_id_of_image")
    private Long fileIdOfImage;

    /**
     * 轮播图描述
     */
    @Column(name = "t_description")
    private String description;

    /**
     * 优先级（越大越靠前）
     */
    @Column(name = "t_priority")
    private Integer priority;


}
